package com.ww.learn

fun systemInfo(): String =
    when (val numberOfCores = Runtime.getRuntime().availableProcessors()) {
        1 -> "1核"
        in 2..16 -> "有${numberOfCores}核"
        else -> "${numberOfCores}核，太多核了..."
    }

fun main() {
    println(systemInfo())
}